﻿//
// Created by francklinson on 2021/3/16.
//

#include <iostream>

void countdown(int n);

int main()
{
    countdown(4);       // call the recursive function
    return 0;
}

void countdown(int n)
{
    using namespace std;
    cout << "Counting down ... " << n << " n at " << &n << endl;
    if (n > 0)
        countdown(n - 1); // function calls itself
    cout << n << " n at " << &n << ": Kaboom!\n";  // 最内层的递归先调用这句
}